﻿using System;
using System.ServiceModel;

namespace ExplorerService.Common.ServiceContracts
{
    [ServiceContract(SessionMode = SessionMode.Required)]
    public interface IClientSessionService
    {
        /// <summary>
        /// Starts a new session
        /// </summary>
        /// <returns>The session ID</returns>
        [OperationContract(IsInitiating = true, IsTerminating = false)]
        Guid GetSessionToken();

        /// <summary>
        /// Receives pings from clients (validates that service is alive)
        /// </summary>
        /// <returns>True</returns>
        [OperationContract(IsInitiating = false, IsTerminating = false)]
        bool Ping();

        /// <summary>
        /// Ends the current session
        /// </summary>
        [OperationContract(IsInitiating = false, IsTerminating = true)]
        void EndSession();

    }
}
